//logs.js
const util = require('../../utils/util.js')
const app = getApp();

Page({
  data: {
    logs: []
  },

  onShareAppMessage: function () {
    var url = app.getcurrentPage();
    var user_id = wx.getStorageSync('user_id');
    return {
      path: url + "?user_id=" + user_id,
      title: '得道1314'
    };                     
  },
  
  onLoad: function () {

    app.bind();
    this.setData({
      logs: (wx.getStorageSync('logs') || []).map(log => {
        return util.formatTime(new Date(log))
      })
    })
  }
})
